<?
		require("../dbconnect.php");
		require("../function.php");

		$field=$_GET["field"];
		$value=$_GET["value"];
		$showName=$_GET["showName"];
		
		if($field=="email")
		{
			$chk=mysql_query("select * from os_member where email='$value'")or die(mysql_error());
			
			if(mysql_num_rows($chk)==0)
			{
				echo "<div class='dw_info'>No member has register with this email account</div>";
			}
			else
			{
				echo "<div class='dw_info'>This email account is registered to ".mysql_result($chk,0,"name").", Member Card Number - ".mysql_result($chk,0,"member_card_number")." </div>";
			}		
		}
		else
		{
			$chk=mysql_query("select * from os_member where member_card_number='$value'")or die(mysql_error());
			
			if(mysql_num_rows($chk)==0)
			{
				echo "<div class='dw_info'>No member has register with this member card number</div>";
			}
			else
			{
				echo "<div class='dw_info'>This member count number is registered to ".mysql_result($chk,0,"name").", Email - ".mysql_result($chk,0,"email")." </div>";
			}
		}		
		
?>